package com.galudisu.handsonic.modules.system.dao;

import com.galudisu.handsonic.modules.system.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author Barudisshu
 */
@Repository
public interface UserDao extends JpaRepository<User, String> {

    User findByUsername(String username);
    @Query("update User u set u.password = ?2 where u.id=?1")
    void changePassword(String id, String newPassword);
}
